<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"/>
    <meta name="keywords" content="端午节活动|端午节拼图|端午节拼图活动">
    <meta name="description" content="快乐端午节，吃粽子赛龙舟，更有玩拼图,赢取福利！">
    <title>参与活动赢大奖</title>
    <audio src="./mp3/mp3.mp3" loop="loop" preload autoplay="autoplay" id="mp3" type="audio/mpeg">您的浏览器不支持 audio 元素。</audio>
    <script type="text/javascript">
        function audioAutoPlay(id) {
            var audio = document.getElementById(id),
                    play = function () {
                        audio.play();
                        document.removeEventListener("touchstart", play, false);
                    };
            audio.play();
            document.addEventListener("WeixinJSBridgeReady", function () {
                play();
            }, false);
            document.addEventListener('YixinJSBridgeReady', function () {
                play();
            }, false);
//            document.addEventListener("touchstart", play, false);
        }
        audioAutoPlay('mp3');
    </script>
    <link rel="stylesheet" href="css/base.css"/>
    <link rel="stylesheet" href="css/style.css"/>
</head>
<body>

<div class="contBox">
    <span class="contBoxMp3" data-play='1'></span>
    <div class="contTim">
        <h4>时间</h4>
        <h5 class="over-time">00</h5>
    </div>
    <!--提示-->
    <div class="contPrompt">
        <div class="contPromptImgBox">
            <img src="./img/1.jpg" alt=""/>
            <i class="l1"></i>
            <i class="l2"></i>
            <i class="l3"></i>
            <i class="l4"></i>
        </div>
        <a href="javascript:;" data-opnind="1" class="btn1" id="contPromptBtn">开始</a>
    </div>
    <!--拼图-->
    <div class="contPintu ds-n">
        <div class="contPintuBox">
        </div>
        <a href="javascript:;" class="btn1" id="contPintuBtn">提示</a>
    </div>
    <!--挑战成功-->
    <div class="gameSuccess ds-n">
        <img src="./img/grenn.png" alt="挑战成功"/>
        <h5 class="col-fff font-36 mt-60">您的成绩为 : <span class="over-time"></span> 秒</h5>
        <h5 class="col-fff font-32 mt-20">成功击败全国 <span id="allbili"></span> %的玩家</h5>
        <a href="./choujiang.html" class="btn1 mt-60">赶紧去抽奖</a>
        <a href="./index.html" class="btn2 mt-30">返回首页</a>
    </div>

    <!--挑战失败-->
    <div class="gameFail ds-n">
        <img src="./img/Fail.png" alt="挑战失败"/>
        <h5 class="col-fff font-36 mt-60">您的成绩为 : <span class="over-time"></span> 秒</h5>
        <h5 class="col-fff font-32 mt-20" id="gameFailText">成绩必须低于30秒才能抽奖</h5>
        <a href="./cont.html" class="btn1 mt-60">再玩一次</a>
        <a href="./index.html" class="btn2 mt-30">返回首页</a>
    </div>
</div>


<script type="text/javascript" src="js/jquery.js"></script>
<script src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
<script type="text/javascript" src="js/mgame2.js"></script>
<script type="text/javascript" src="js/script.js"></script>
<script type="text/javascript">
    $(function () {

        wx.config({
            debug: false,
            appId: '',
            timestamp: '',
            nonceStr: '',
            signature: '',
            jsApiList: [
                'onMenuShareTimeline',
                'onMenuShareAppMessage'
            ]
        });

        wx.ready(function () {
            // 分享给朋友
            wx.onMenuShareAppMessage({
                title: '【福利】端午节，拼图游戏+现金大奖，还等什么？', // 名
                desc: '关注华质检测，快乐端午节，吃粽子赛龙舟，更有玩拼图赢取福利！', // 简介
                link: 'http://cj.weiqiangtech.com/lotterydraw/page', // 分享地址
                imgUrl: './img/pic300.jpg', // 分享的图标
            });
            // 分享到朋友圈
            wx.onMenuShareTimeline({
                title: '【福利】端午节，拼图游戏+现金大奖，还等什么？', // 名
                desc: '关注华质检测，快乐端午节，吃粽子赛龙舟，更有玩拼图赢取福利！', // 简介
                link: 'http://cj.weiqiangtech.com/lotterydraw/page', // 分享地址
                imgUrl: './img/pic300.jpg', // 分享的图标
            });
        });

        document.body.addEventListener('touchstart', function () {
        });
        $('.contBoxMp3').on('touchstart', function (e) {
            if($(e.target).hasClass('contBoxMp3')){
                $(this).toggleClass('play');
                if ($(this).attr("data-play")==1) {
                    $('#mp3')[0].pause();
                    $(this).attr("data-play",2)
                } else {
                    $('#mp3')[0].play()
                    $(this).attr("data-play",1)
                }
            }
        })
    })


</script>
</body>
</html>